const { OpenAI, Prompt } = require("@speckai/speck");

let p = new Prompt(messages=
    [
        {
            "role": "system",
            "content": "You are helpful."
        },
        {
            "role": "user",
            "content": "I am helpful."
        }
    ]
);

let all = Prompt.readAll("prompts/test.prompt");
console.log(all);

const openai = new OpenAI({
  apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted
});

async function main() {
  const chatCompletion = await openai.chat.completions.create({
    messages: [{ role: 'user', content: 'Say this is a test' }],
    model: 'gpt-3.5-turbo',
  });

    console.log(chatCompletion);
}

main();